revXMLCreateTreeWithNamespaces
Type
function
Summary
Creates an XML tree structure from XML text data ignoring namespace tags and attributes.
Syntax
revXMLCreateTreeWithNamespaces(<XMLText>, <dontParseBadData>, <createTree>, <sendMessages>)
Description
Use the revXMLCreateTreeWithNamespaces function to make XML text into an XML tree which returns XML namespace tags and attributes as part of the tree without doing any processing.
Use the revXMLCreateTreeWithNamespaces function to make XML Text into an XML Tree, ignoring XML Namespace related tags and functions. The revXMLCreateTreeWithNamespaces function returns namespace tags and attributes as part of the tree without doing any processing.
Use the revXMLCreateTreeWithNamespaces function when an application needs the namespace information to perform correctly.
If the dontparseBadData is false, the revXMLCreateTreeWithNamespaces function tries to parse XML data even if it is not well-formed. Otherwise, the function stops executing as soon as it encounters data that is not well-formed XML.
If the createTree is true, the function creates a tree structure in memory. Otherwise, the function simply parses the XML data without creating an XML tree.
If the sendMessages is true, the revXMLStartTree, revStartXMLNode, revStartXMLData, revEndXMLNode, and revXMLEndTree messages are sent while the XML data is being parsed. Otherwise, these messages are not sent.
If the revXMLCreateTreeWithNamespaces function encounters an error, it returns an error message starting with "xmlerr".
The revXMLCreateTreeWithNamespaces function is part of the XML library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.
Parameters
Name | Type | Description |
---|---|---|
XMLText | A string. | |
dontparseBadData | bool | |
createTree | bool | |
sendMessages | bool |
Examples
revXMLCreateTreeWithNamespaces(field "XML Data",true,true,false)
put revXMLCreateTreeWithNamespaces(theData,false,true,false) into theError
Related
message: revStartXMLData, revStartXMLNode, revEndXMLNode, revXMLStartTree, revXMLEndTree
command: revXMLDeleteAllTrees, revXMLMoveNode, revXMLAppend
control structure: function
function: revXMLValidateDTD, revXMLTrees, revXMLCreateTree, revXMLCreateTreeFromFileWithNamespaces
glossary: LiveCode custom library, return, string, XML tree, Standalone Application Settings, message, standalone application, XML, function, command
keyword: integer
library: XML library
Compatibility and Support
Introduced
LiveCode 4.5.1
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile